<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class CreateTopbarAreasTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('topbar_areas', function (Blueprint $table) {
            $table->increments('id');
            $table->integer('topbar_id')->default(0)->nullable()->unsigned()->comment('topbarID');
            $table->string('layout')->nullable()->comment('布局名称');
            $table->string('component')->nullable()->comment('组件名称');
            $table->string('onfocus', 100)->nullable()->comment('onfocus');
            $table->string('onclick', 100)->nullable()->comment('onclick');
            $table->string('editable', 100)->nullable()->comment('editable');
            $table->timestamps();
            $table->softDeletes();

        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('topbar_areas');
    }
}
